package test.com.linkgie.galaxyframework.binaryserialize;

import com.linkgie.galaxyframework.binaryserialize.BinaryType;
import com.linkgie.galaxyframework.binaryserialize.BinaryField;
import com.linkgie.galaxyframework.binaryserialize.PrimitiveType;

import utils.Bytes;

/**
 * BytesValue is the base structure of Value in Blockchain Account;
 * 
 * @author huanghaiquan
 *
 */
@BinaryType(code = BytesValue.BYTES_VALUE)
public interface BytesValue {
	
	public static final int BYTES_VALUE = 10010;

	/**
	 * 数据类型；
	 * 
	 * @return
	 */
	@BinaryField(index = 0, isEnum = true)
	DataType getType();

	/**
	 * 数据值的二进制序列；
	 * 
	 * @return
	 */
	@BinaryField(index = 1, primitiveType = PrimitiveType.BYTES)
	Bytes getBytes();
	
}
